home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / demos / e-q / pmbs / prometheus / developer / dimbeispiel.c < prev    next >
Encoding:
Text File  |  1995-09-19  |  681 b   |  29 lines

  1. Beispiel zur Behandlung von PMBS-Dimfeldern in C
  2. (die Brettliste wird z.B. in DimFeldern verwaltet)
  3.  
  4.       #include <proto/exec.h>
  5.  
  6.       struct DimFeld
  7.       {
  8.         long DimAnzahl;
  9.         void *DimData[0];  // erzeugt ANSI-Portablilit„tswarnung !!
  10.       };
  11.  
  12.       struct DimFeld *GetDimFeld(long offset)
  13.       {
  14.         struct MsgPort *PServer;
  15.         struct DimFeld *DimFeld;
  16.  
  17.         PServer=FindPort("rexx_PXServer");
  18.  
  19.         if(PServer)
  20.         {
  21.           DimFeld=(struct DimFeld *) (* ( (ULONG *) ( * ( (ULONG *)
  22.                       ((UBYTE *) PServer + offset ))))) ;
  23.  
  24.           return DimFeld;
  25.         }
  26.         else
  27.           return (struct DimFeld *)0L;
  28.       }
  29.